package org.jeecg.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.domain.po.ServeItem;
import org.jeecg.domain.po.ServeType;
import org.jeecg.service.ServeItemService;
import org.jeecg.mapper.ServeItemMapper;
import org.jeecg.utils.ResponseResult;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 32327
* @description 针对表【serve_item(服务项表)】的数据库操作Service实现
* @createDate 2024-12-20 09:54:32
*/
@Service
public class ServeItemServiceImpl extends ServiceImpl<ServeItemMapper, ServeItem>
    implements ServeItemService{
    //    根据服务类型的id查询所有的服务项
    @Override
    public ResponseResult serveItemListByTypeId(String typeId) {
        List<ServeItem> list = this.list(Wrappers.<ServeItem>lambdaQuery()
                .eq(ServeItem::getServeTypeId, typeId)
                .eq(ServeItem::getActiveStatus, 2));
        return ResponseResult.okResult(list);
    }
}




